{% extends "v1/base.html" %}
{% block content %}

<div id="export" class="export">
<a href="http://172.16.3.119:80/static/xlsx/agingTerm.xlsx" ><span>导出数据</span></a>
</div>
  
<div id="year" class="data"></div>
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById("year")); 
    var dateStr = "{{ item['y'] }}";
    var xAxisList = dateStr.split(';');
    
    var yAxisList = "{{ item['x'] }}".split(';')
    //var seriesList = "{{ item['overdueRate_restBenJin'] }}".split('abcd')
    
    <!-- var seriesData = []; -->
    <!-- seriesList.forEach(function (element) { -->
        <!-- var semiMap = JSON.parse(element.replace(/&#34;/g,'"')) -->
        <!-- seriesData.push(semiMap); -->
    <!-- });  -->
    
    option = {
        title: {
            text: '逾期率M1至M6+',
            subtext: '基于人数'
        },
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow'
            }
        },
        legend: {
            data: ['逾期率(%)']
        },
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        xAxis: {
            type: 'value',
            boundaryGap: [0, 0.01]
        },
        yAxis: {
            type: 'category',
            data: xAxisList
        },
        series: [
            {
                name: '逾期率(%)',
                type: 'bar',
                <!-- itemStyle:{ -->
                    <!-- color:'#949494' -->
                <!-- },  -->
                data: yAxisList
            }
        ]
    };
    // 使用刚指定的配置项和数据显示图表。  
    myChart.setOption(option); 
</script>


{% endblock %}